<%@ include file="/common/taglibs.jsp"%>
<head>
<script type="text/javascript" src="<c:url value="/scripts/common.js"/>"></script>
<style type="text/css">


#news_list {
	list-style: none;
	font-size:12px;
	background: url("/images/listbg.gif") repeat scroll left top transparent;
	padding-left:8px;
}
#news_list li {
	line-height: 27px;
	background:url(/images/list_icon.gif) no-repeat scroll left 11px transparent;
	padding-left:11px;
	overflow: hidden;
    padding-right: 16px;
}
#news_list li a {
	color:#5b5b5b;
}

#news_list li a:hover{
	color:#ff8000;
}
#news_list span {
	line-height: 27px;
	float:right;
}
</style>

<script type="text/javascript">
$(function() {
	var aNods = $("ul > div");
	aNods.click(function() {
			var aNod = $(this);
			var liNods = aNod.nextAll("li");
			liNods.toggle(400);
		});
})
</script>
</head>

<div>
	<div style="width:180px;min-height:100px; float:left;">
		
		<div style="width:178px;border:1px #69f solid;margin-bottom:10px;">
			<div style="background:#6699ff;height:30px;line-height:30px;font-size:14px;padding-left:20px;color:#ffffff">
				<fmt:message key="latest.news"/>
			</div>
			<center><h1>news</h1></center>
		</div>
		<jsp:include page="/common/contact_nav.jsp"></jsp:include>
	</div>
	<div style="float:right; width:755px;min-height:402px;">
		<img alt="" src="/images/QQ.png" width="755px">
		<div style="padding-left:15px;line-height:25px;background-image:url(/images/title_bg2.jpg);width:755x;height:25px">
			<fmt:message key="latest.news"/>
		</div>
		<div style="margin-top:10px">
			<ul id="news_list">
			<c:forEach items="${newsList}" var="news">
				<li><a href="<c:url value="/app/news/news?id=${news.id}"/>">${news.title}</a><span>[${news.date}]</span></li>
			</c:forEach>
			</ul>
		</div>
	</div>
	
	<script type="text/javascript">
	//getNewsData();
	function getNewsData(){
	 	var passUrl = '<c:url value="/app/news/news.json"/>';
		var passData = '';
		createAjax(passUrl, passData, resetPageData); 
	}
	
	function resetPageData(data) {
		var obj = eval(data);
		var newsList = obj.newsList;
		for (var i = 0; i < newsList.length; i++) {
			var news = newsList[i];
			var htm = '<li><a href="/app/news/newsDetail?id=' + news.id + '">' + news.title 
					+ '</a><span>' + news.date + '</span></li>';
			$('#news_list').append(htm);
		}
	}
		
	</script>
</div>